import { createSlice } from '@reduxjs/toolkit';

// 使用该类型定义初始 state
const initialState = {
  showBar: true,
};

const tabbarSlice = createSlice({
  name: 'tabbar',
  initialState,
  reducers: {
    show(state) {
      state.showBar = true;
    },
    hide(state) {
      state.showBar = false;
    },
  },
});

export const { show, hide } = tabbarSlice.actions;
export default tabbarSlice.reducer;
